diff --git a/drivers/core/device.c b/drivers/core/device.c
index a6b8c3e..fce9909 100644
--- a/drivers/core/device.c
+++ b/drivers/core/device.c
@@ -655,7 +655,7 @@
 		return -ENODEV;
 
 	list_for_each_entry(dev, &parent->child_head, sibling_node) {
-		if ((find_req_seq ? dev->req_seq : dev->seq) ==
+		if ((find_req_seq ? dev->req_seq : dev_seq(dev)) ==
 				seq_or_req_seq) {
 			*devp = dev;
 			return 0;
diff --git a/drivers/core/dump.c b/drivers/core/dump.c
index 221b4f7..33cfee6 100644
--- a/drivers/core/dump.c
+++ b/drivers/core/dump.c
@@ -67,8 +67,8 @@
 	printf("%-3i %c %s @ %08lx", index,
 	       dev->flags & DM_FLAG_ACTIVATED ? '*' : ' ',
 	       dev->name, (ulong)map_to_sysmem(dev));
-	if (dev->seq != -1 || dev->req_seq != -1)
-		printf(", seq %d, (req %d)", dev->seq, dev->req_seq);
+	if (dev_seq(dev) != -1 || dev->req_seq != -1)
+		printf(", seq %d, (req %d)", dev_seq(dev), dev->req_seq);
 	puts("\n");
 }
 
diff --git a/drivers/core/uclass.c b/drivers/core/uclass.c
index b1d882e..e2372c6 100644
--- a/drivers/core/uclass.c
+++ b/drivers/core/uclass.c
@@ -311,8 +311,8 @@
 
 	uclass_foreach_dev(dev, uc) {
 		log_debug("   - %d %d '%s'\n",
-			  dev->req_seq, dev->seq, dev->name);
-		if ((find_req_seq ? dev->req_seq : dev->seq) ==
+			  dev->req_seq, dev_seq(dev), dev->name);
+		if ((find_req_seq ? dev->req_seq : dev_seq(dev)) ==
 				seq_or_req_seq) {
 			*devp = dev;
 			log_debug("   - found\n");
@@ -695,7 +695,7 @@
 	int seq = 0;
 	int ret;
 
-	assert(dev->seq == -1);
+	assert(dev_seq(dev) == -1);
 	ret = uclass_find_device_by_seq(uc_drv->id, dev->req_seq, false, &dup);
 	if (!ret) {
 		dm_warn("Device '%s': seq %d is in use by '%s'\n",
diff --git a/drivers/gpio/octeon_gpio.c b/drivers/gpio/octeon_gpio.c
index f34b05d..958516d 100644
--- a/drivers/gpio/octeon_gpio.c
+++ b/drivers/gpio/octeon_gpio.c
@@ -202,7 +202,7 @@
 
 	uc_priv->bank_name  = strdup(dev->name);
 	end = strchr(uc_priv->bank_name, '@');
-	end[0] = 'A' + dev->seq;
+	end[0] = 'A' + dev_seq(dev);
 	end[1] = '\0';
 
 	debug("%s(%s): base address: %p, pin count: %d\n",
diff --git a/drivers/i2c/ast_i2c.c b/drivers/i2c/ast_i2c.c
index 3aa8ad1..2d3feca 100644
--- a/drivers/i2c/ast_i2c.c
+++ b/drivers/i2c/ast_i2c.c
@@ -110,7 +110,7 @@
 {
 	struct ast2500_scu *scu;
 
-	debug("Enabling I2C%u\n", dev->seq);
+	debug("Enabling I2C%u\n", dev_seq(dev));
 
 	/*
 	 * Get all I2C devices out of Reset.
@@ -307,7 +307,7 @@
 	struct ast_i2c_regs *regs = priv->regs;
 	ulong i2c_rate, divider;
 
-	debug("Setting speed for I2C%d to <%u>\n", dev->seq, speed);
+	debug("Setting speed for I2C%d to <%u>\n", dev_seq(dev), speed);
 	if (!speed) {
 		debug("No valid speed specified\n");
 		return -EINVAL;
diff --git a/drivers/i2c/davinci_i2c.c b/drivers/i2c/davinci_i2c.c
index 074d609..7811aba 100644
--- a/drivers/i2c/davinci_i2c.c
+++ b/drivers/i2c/davinci_i2c.c
@@ -470,7 +470,7 @@
 {
 	struct i2c_bus *i2c_bus = dev_get_priv(dev);
 
-	i2c_bus->id = dev->seq;
+	i2c_bus->id = dev_seq(dev);
 	i2c_bus->regs = dev_read_addr_ptr(dev);
 
 	i2c_bus->speed = 100000;
diff --git a/drivers/i2c/exynos_hs_i2c.c b/drivers/i2c/exynos_hs_i2c.c
index 7dbf0a4..879ddc6 100644
--- a/drivers/i2c/exynos_hs_i2c.c
+++ b/drivers/i2c/exynos_hs_i2c.c
@@ -533,7 +533,7 @@
 		dev_read_u32_default(dev, "clock-frequency",
 				     I2C_SPEED_STANDARD_RATE);
 	i2c_bus->node = node;
-	i2c_bus->bus_num = dev->seq;
+	i2c_bus->bus_num = dev_seq(dev);
 
 	exynos_pinmux_config(i2c_bus->id, PINMUX_FLAG_HS_MODE);
 
diff --git a/drivers/i2c/i2c-gpio.c b/drivers/i2c/i2c-gpio.c
index 8bd96a0..387f00b 100644
--- a/drivers/i2c/i2c-gpio.c
+++ b/drivers/i2c/i2c-gpio.c
@@ -298,7 +298,7 @@
 	i2c_gpio_send_stop(bus, delay);
 
 	debug("%s: bus: %d (%s) chip: %x flags: %x ret: %d\n",
-	      __func__, dev->seq, dev->name, chip, chip_flags, ret);
+	      __func__, dev_seq(dev), dev->name, chip, chip_flags, ret);
 
 	return ret;
 }
diff --git a/drivers/i2c/imx_lpi2c.c b/drivers/i2c/imx_lpi2c.c
index 270a494..92c5003 100644
--- a/drivers/i2c/imx_lpi2c.c
+++ b/drivers/i2c/imx_lpi2c.c
@@ -289,7 +289,7 @@
 			return clock_rate;
 		}
 	} else {
-		clock_rate = imx_get_i2cclk(bus->seq);
+		clock_rate = imx_get_i2cclk(dev_seq(bus));
 		if (!clock_rate)
 			return -EPERM;
 	}
@@ -377,7 +377,7 @@
 	val = readl(&regs->mcr) & ~LPI2C_MCR_MEN_MASK;
 	writel(val | LPI2C_MCR_MEN(1), &regs->mcr);
 
-	debug("i2c : controller bus %d, speed %d:\n", bus->seq, speed);
+	debug("i2c : controller bus %d, speed %d:\n", dev_seq(bus), speed);
 
 	return ret;
 }
@@ -452,11 +452,11 @@
 		return -EINVAL;
 
 	i2c_bus->base = addr;
-	i2c_bus->index = bus->seq;
+	i2c_bus->index = dev_seq(bus);
 	i2c_bus->bus = bus;
 
 	/* power up i2c resource */
-	ret = init_i2c_power(bus->seq);
+	ret = init_i2c_power(dev_seq(bus));
 	if (ret) {
 		debug("init_i2c_power err = %d\n", ret);
 		return ret;
@@ -486,7 +486,7 @@
 		}
 	} else {
 		/* To i.MX7ULP, only i2c4-7 can be handled by A7 core */
-		ret = enable_i2c_clk(1, bus->seq);
+		ret = enable_i2c_clk(1, dev_seq(bus));
 		if (ret < 0)
 			return ret;
 	}
@@ -496,7 +496,7 @@
 		return ret;
 
 	debug("i2c : controller bus %d at 0x%lx , speed %d: ",
-	      bus->seq, i2c_bus->base,
+	      dev_seq(bus), i2c_bus->base,
 	      i2c_bus->speed);
 
 	return 0;
diff --git a/drivers/i2c/lpc32xx_i2c.c b/drivers/i2c/lpc32xx_i2c.c
index e321d4b..ad11e97 100644
--- a/drivers/i2c/lpc32xx_i2c.c
+++ b/drivers/i2c/lpc32xx_i2c.c
@@ -282,7 +282,11 @@
 static int lpc32xx_i2c_probe(struct udevice *bus)
 {
 	struct lpc32xx_i2c_dev *dev = dev_get_plat(bus);
-	bus->seq = dev->index;
+
+	/*
+	 * FIXME: This is not permitted
+	 *	dev_seq(bus) = dev->index;
+	 */
 
 	__i2c_init(dev->base, dev->speed, 0, dev->index);
 	return 0;
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c
index 3d37858..cbc2bbf 100644
--- a/drivers/i2c/mxc_i2c.c
+++ b/drivers/i2c/mxc_i2c.c
@@ -914,7 +914,7 @@
 	}
 
 	i2c_bus->base = addr;
-	i2c_bus->index = bus->seq;
+	i2c_bus->index = dev_seq(bus);
 	i2c_bus->bus = bus;
 
 	/* Enable clk */
@@ -930,7 +930,7 @@
 		return ret;
 	}
 #else
-	ret = enable_i2c_clk(1, bus->seq);
+	ret = enable_i2c_clk(1, dev_seq(bus));
 	if (ret < 0)
 		return ret;
 #endif
@@ -942,7 +942,7 @@
 	ret = fdt_stringlist_search(fdt, node, "pinctrl-names", "gpio");
 	if (ret < 0) {
 		debug("i2c bus %d at 0x%2lx, no gpio pinctrl state.\n",
-		      bus->seq, i2c_bus->base);
+		      dev_seq(bus), i2c_bus->base);
 	} else {
 		ret = gpio_request_by_name_nodev(offset_to_ofnode(node),
 				"scl-gpios", 0, &i2c_bus->scl_gpio,
@@ -955,7 +955,7 @@
 		    ret || ret2) {
 			dev_err(bus,
 				"i2c bus %d at %lu, fail to request scl/sda gpio\n",
-				bus->seq, i2c_bus->base);
+				dev_seq(bus), i2c_bus->base);
 			return -EINVAL;
 		}
 	}
@@ -966,7 +966,7 @@
 	 */
 
 	debug("i2c : controller bus %d at %lu , speed %d: ",
-	      bus->seq, i2c_bus->base,
+	      dev_seq(bus), i2c_bus->base,
 	      i2c_bus->speed);
 
 	return 0;
diff --git a/drivers/i2c/nx_i2c.c b/drivers/i2c/nx_i2c.c
index a672c01..c63a732 100644
--- a/drivers/i2c/nx_i2c.c
+++ b/drivers/i2c/nx_i2c.c
@@ -240,7 +240,7 @@
 		return -EINVAL;
 	bus->regs = (struct nx_i2c_regs *)addr;
 
-	bus->bus_num = dev->seq;
+	bus->bus_num = dev_seq(dev);
 
 	/* i2c node parsing */
 	i2c_process_node(dev);
diff --git a/drivers/i2c/octeon_i2c.c b/drivers/i2c/octeon_i2c.c
index b1a9cce..100c751 100644
--- a/drivers/i2c/octeon_i2c.c
+++ b/drivers/i2c/octeon_i2c.c
@@ -811,7 +811,7 @@
 	if (ret)
 		return ret;
 
-	debug("TWSI bus %d at %p\n", dev->seq, twsi->base);
+	debug("TWSI bus %d at %p\n", dev_seq(dev), twsi->base);
 
 	/* Start with standard speed, real speed set via DT or cmd */
 	return twsi_init(twsi->base, i2c_slave_addr);
diff --git a/drivers/i2c/s3c24x0_i2c.c b/drivers/i2c/s3c24x0_i2c.c
index ff2c345..0c89156 100644
--- a/drivers/i2c/s3c24x0_i2c.c
+++ b/drivers/i2c/s3c24x0_i2c.c
@@ -318,7 +318,7 @@
 		dev_read_u32_default(dev, "clock-frequency",
 				     I2C_SPEED_STANDARD_RATE);
 	i2c_bus->node = node;
-	i2c_bus->bus_num = dev->seq;
+	i2c_bus->bus_num = dev_seq(dev);
 
 	exynos_pinmux_config(i2c_bus->id, 0);
 
diff --git a/drivers/i2c/tegra_i2c.c b/drivers/i2c/tegra_i2c.c
index 7cb5e8b..1e74484 100644
--- a/drivers/i2c/tegra_i2c.c
+++ b/drivers/i2c/tegra_i2c.c
@@ -362,7 +362,7 @@
 	int ret;
 	bool is_dvc;
 
-	i2c_bus->id = dev->seq;
+	i2c_bus->id = dev_seq(dev);
 	i2c_bus->type = dev_get_driver_data(dev);
 	i2c_bus->regs = (struct i2c_ctlr *)dev_read_addr(dev);
 	if ((ulong)i2c_bus->regs == FDT_ADDR_T_NONE) {
@@ -408,7 +408,8 @@
 	}
 	i2c_init_controller(i2c_bus);
 	debug("%s: controller bus %d at %p, speed %d: ",
-	      is_dvc ? "dvc" : "i2c", dev->seq, i2c_bus->regs, i2c_bus->speed);
+	      is_dvc ? "dvc" : "i2c", dev_seq(dev), i2c_bus->regs,
+	      i2c_bus->speed);
 
 	return 0;
 }
diff --git a/drivers/mmc/fsl_esdhc_imx.c b/drivers/mmc/fsl_esdhc_imx.c
index 6bf8695..34c2dce 100644
--- a/drivers/mmc/fsl_esdhc_imx.c
+++ b/drivers/mmc/fsl_esdhc_imx.c
@@ -1542,7 +1542,7 @@
 	 * work as expected.
 	 */
 
-	init_clk_usdhc(dev->seq);
+	init_clk_usdhc(dev_seq(dev));
 
 #if CONFIG_IS_ENABLED(CLK)
 	/* Assigned clock already set clock */
@@ -1559,7 +1559,7 @@
 
 	priv->sdhc_clk = clk_get_rate(&priv->per_clk);
 #else
-	priv->sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK + dev->seq);
+	priv->sdhc_clk = mxc_get_clock(MXC_ESDHC_CLK + dev_seq(dev));
 	if (priv->sdhc_clk <= 0) {
 		dev_err(dev, "Unable to get clk for %s\n", dev->name);
 		return -EINVAL;
diff --git a/drivers/mtd/spi/sandbox.c b/drivers/mtd/spi/sandbox.c
index 740bd75..3c01e3b 100644
--- a/drivers/mtd/spi/sandbox.c
+++ b/drivers/mtd/spi/sandbox.c
@@ -131,7 +131,7 @@
 	int ret = 0;
 	int cs = -1;
 
-	debug("%s: bus %d, looking for emul=%p: ", __func__, bus->seq, dev);
+	debug("%s: bus %d, looking for emul=%p: ", __func__, dev_seq(bus), dev);
 	ret = sandbox_spi_get_emul(state, bus, dev, &emul);
 	if (ret) {
 		printf("Error: Unknown chip select for device '%s'\n",
@@ -565,7 +565,7 @@
 			 struct udevice **emulp)
 {
 	struct sandbox_spi_info *info;
-	int busnum = bus->seq;
+	int busnum = dev_seq(bus);
 	int cs = spi_chip_select(slave);
 	int ret;
 
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 2ba5481..e3b29a9 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -1451,7 +1451,7 @@
 
 	fec_reg_setup(priv);
 
-	priv->dev_id = dev->seq;
+	priv->dev_id = dev_seq(dev);
 
 #ifdef CONFIG_DM_ETH_PHY
 	bus = eth_phy_get_mdio_bus(dev);
@@ -1459,9 +1459,10 @@
 
 	if (!bus) {
 #ifdef CONFIG_FEC_MXC_MDIO_BASE
-		bus = fec_get_miibus((ulong)CONFIG_FEC_MXC_MDIO_BASE, dev->seq);
+		bus = fec_get_miibus((ulong)CONFIG_FEC_MXC_MDIO_BASE,
+				     dev_seq(dev));
 #else
-		bus = fec_get_miibus((ulong)priv->eth, dev->seq);
+		bus = fec_get_miibus((ulong)priv->eth, dev_seq(dev));
 #endif
 	}
 	if (!bus) {
diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c
index 4b0c0ed..5bfe378 100644
--- a/drivers/net/fsl-mc/mc.c
+++ b/drivers/net/fsl-mc/mc.c
@@ -187,7 +187,7 @@
 #ifdef CONFIG_DM_ETH
 	struct eth_pdata *plat = dev_get_plat(eth_dev);
 	unsigned char *enetaddr = plat->enetaddr;
-	int eth_index = eth_dev->seq;
+	int eth_index = dev_seq(eth_dev);
 #else
 	unsigned char *enetaddr = eth_dev->enetaddr;
 	int eth_index = eth_dev->index;
diff --git a/drivers/net/fsl_mcdmafec.c b/drivers/net/fsl_mcdmafec.c
index efe8251..0196462 100644
--- a/drivers/net/fsl_mcdmafec.c
+++ b/drivers/net/fsl_mcdmafec.c
@@ -502,7 +502,7 @@
 	int retval;
 	const u32 *val;
 
-	info->index = dev->seq;
+	info->index = dev_seq(dev);
 	info->iobase = pdata->iobase;
 	info->miibase = pdata->iobase;
 	info->phy_addr = -1;
diff --git a/drivers/net/ftgmac100.c b/drivers/net/ftgmac100.c
index 3931d2c..69e299d 100644
--- a/drivers/net/ftgmac100.c
+++ b/drivers/net/ftgmac100.c
@@ -171,7 +171,7 @@
 	bus->write = ftgmac100_mdio_write;
 	bus->priv  = priv;
 
-	ret = mdio_register_seq(bus, dev->seq);
+	ret = mdio_register_seq(bus, dev_seq(dev));
 	if (ret) {
 		free(bus);
 		return ret;
diff --git a/drivers/net/higmacv300.c b/drivers/net/higmacv300.c
index dab2f60..aa79d6e 100644
--- a/drivers/net/higmacv300.c
+++ b/drivers/net/higmacv300.c
@@ -528,7 +528,7 @@
 	bus->priv = priv;
 	priv->bus = bus;
 
-	ret = mdio_register_seq(bus, dev->seq);
+	ret = mdio_register_seq(bus, dev_seq(dev));
 	if (ret)
 		return ret;
 
diff --git a/drivers/net/mcffec.c b/drivers/net/mcffec.c
index b1ddde4..4fa7136 100644
--- a/drivers/net/mcffec.c
+++ b/drivers/net/mcffec.c
@@ -524,7 +524,7 @@
 	int retval, fec_idx;
 	const u32 *val;
 
-	info->index = dev->seq;
+	info->index = dev_seq(dev);
 	info->iobase = pdata->iobase;
 	info->phy_addr = -1;
 
diff --git a/drivers/net/octeontx/nicvf_main.c b/drivers/net/octeontx/nicvf_main.c
index 750629a..c30ba49 100644
--- a/drivers/net/octeontx/nicvf_main.c
+++ b/drivers/net/octeontx/nicvf_main.c
@@ -452,11 +452,12 @@
 	 * u-boot framework updates MAC to random address.
 	 * Use this hook to update mac address in environment.
 	 */
-	if (!eth_env_get_enetaddr_by_index("eth", dev->seq, ethaddr)) {
-		eth_env_set_enetaddr_by_index("eth", dev->seq, pdata->enetaddr);
+	if (!eth_env_get_enetaddr_by_index("eth", dev_seq(dev), ethaddr)) {
+		eth_env_set_enetaddr_by_index("eth", dev_seq(dev),
+					      pdata->enetaddr);
 		debug("%s: pMAC %pM\n", __func__, pdata->enetaddr);
 	}
-	eth_env_get_enetaddr_by_index("eth", dev->seq, ethaddr);
+	eth_env_get_enetaddr_by_index("eth", dev_seq(dev), ethaddr);
 	if (memcmp(ethaddr, pdata->enetaddr, ARP_HLEN)) {
 		debug("%s: pMAC %pM\n", __func__, pdata->enetaddr);
 		nicvf_hw_set_mac_addr(nic, dev);
@@ -540,7 +541,7 @@
 
 	if (is_valid_ethaddr(ethaddr)) {
 		memcpy(pdata->enetaddr, ethaddr, ARP_HLEN);
-		eth_env_set_enetaddr_by_index("eth", dev->seq, ethaddr);
+		eth_env_set_enetaddr_by_index("eth", dev_seq(dev), ethaddr);
 	}
 	debug("%s enetaddr %pM ethaddr %pM\n", __func__,
 	      pdata->enetaddr, ethaddr);
diff --git a/drivers/net/octeontx/smi.c b/drivers/net/octeontx/smi.c
index 8e2c3ca..d4baddb 100644
--- a/drivers/net/octeontx/smi.c
+++ b/drivers/net/octeontx/smi.c
@@ -335,7 +335,7 @@
 		priv = malloc(sizeof(*priv));
 		if (!bus || !priv) {
 			printf("Failed to allocate OcteonTX MDIO bus # %u\n",
-			       dev->seq);
+			       dev_seq(dev));
 			return -1;
 		}
 
diff --git a/drivers/net/octeontx2/nix.c b/drivers/net/octeontx2/nix.c
index 9649b39..039c44b 100644
--- a/drivers/net/octeontx2/nix.c
+++ b/drivers/net/octeontx2/nix.c
@@ -736,7 +736,7 @@
 	 */
 	if (memcmp(nix->lmac->mac_addr, pdata->enetaddr, ARP_HLEN)) {
 		memcpy(nix->lmac->mac_addr, pdata->enetaddr, 6);
-		eth_env_set_enetaddr_by_index("eth", rvu->dev->seq,
+		eth_env_set_enetaddr_by_index("eth", dev_seq(rvu->dev),
 					      pdata->enetaddr);
 		cgx_lmac_mac_filter_setup(nix->lmac);
 		/* Update user given MAC address to ATF for update
diff --git a/drivers/net/octeontx2/rvu_pf.c b/drivers/net/octeontx2/rvu_pf.c
index d74a196..4b00178 100644
--- a/drivers/net/octeontx2/rvu_pf.c
+++ b/drivers/net/octeontx2/rvu_pf.c
@@ -34,7 +34,7 @@
 	/* to make post_probe happy */
 	if (is_valid_ethaddr(nix->lmac->mac_addr)) {
 		memcpy(pdata->enetaddr, nix->lmac->mac_addr, 6);
-		eth_env_set_enetaddr_by_index("eth", rvu->dev->seq,
+		eth_env_set_enetaddr_by_index("eth", dev_seq(rvu->dev),
 					      pdata->enetaddr);
 	}
 
@@ -59,7 +59,7 @@
 	debug("%s: name: %s\n", __func__, dev->name);
 
 	rvu->pf_base = dm_pci_map_bar(dev, PCI_BASE_ADDRESS_2, PCI_REGION_MEM);
-	rvu->pfid = dev->seq + 1; // RVU PF's start from 1;
+	rvu->pfid = dev_seq(dev) + 1; // RVU PF's start from 1;
 	rvu->dev = dev;
 	if (!rvu_af_dev) {
 		printf("%s: Error: Could not find RVU AF device\n",
@@ -80,7 +80,7 @@
 	 * modify device name to include index/sequence number,
 	 * for better readability, this is 1:1 mapping with eth0/1/2.. names.
 	 */
-	sprintf(name, "rvu_pf#%d", dev->seq);
+	sprintf(name, "rvu_pf#%d", dev_seq(dev));
 	device_set_name(dev, name);
 	debug("%s: name: %s\n", __func__, dev->name);
 	return err;
diff --git a/drivers/net/xilinx_axi_emac.c b/drivers/net/xilinx_axi_emac.c
index 55d6e34..343ab69 100644
--- a/drivers/net/xilinx_axi_emac.c
+++ b/drivers/net/xilinx_axi_emac.c
@@ -697,7 +697,7 @@
 	priv->bus->write = axiemac_miiphy_write;
 	priv->bus->priv = priv;
 
-	ret = mdio_register_seq(priv->bus, dev->seq);
+	ret = mdio_register_seq(priv->bus, dev_seq(dev));
 	if (ret)
 		return ret;
 
diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c
index cc2a746..5c76887 100644
--- a/drivers/net/xilinx_emaclite.c
+++ b/drivers/net/xilinx_emaclite.c
@@ -568,7 +568,7 @@
 	emaclite->bus->write = emaclite_miiphy_write;
 	emaclite->bus->priv = emaclite;
 
-	ret = mdio_register_seq(emaclite->bus, dev->seq);
+	ret = mdio_register_seq(emaclite->bus, dev_seq(dev));
 	if (ret)
 		return ret;
 
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index 244974c..5cb02bb 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -705,7 +705,7 @@
 	priv->bus->write = zynq_gem_miiphy_write;
 	priv->bus->priv = priv;
 
-	ret = mdio_register_seq(priv->bus, dev->seq);
+	ret = mdio_register_seq(priv->bus, dev_seq(dev));
 	if (ret)
 		goto err2;
 
diff --git a/drivers/pci/pci-aardvark.c b/drivers/pci/pci-aardvark.c
index f4270cc..a9ca5c2 100644
--- a/drivers/pci/pci-aardvark.c
+++ b/drivers/pci/pci-aardvark.c
@@ -638,7 +638,7 @@
 		dev_warn(pcie->dev, "PCIE Reset on GPIO support is missing\n");
 	}
 
-	pcie->first_busno = dev->seq;
+	pcie->first_busno = dev_seq(dev);
 	pcie->dev = pci_get_controller(dev);
 
 	return pcie_advk_setup_hw(pcie);
diff --git a/drivers/pci/pci-uclass.c b/drivers/pci/pci-uclass.c
index 9fc13e3..ebe7fb7 100644
--- a/drivers/pci/pci-uclass.c
+++ b/drivers/pci/pci-uclass.c
@@ -65,7 +65,7 @@
 	if (!device_active(bus))
 		log_err("PCI: Device '%s' on unprobed bus '%s'\n", dev->name,
 			bus->name);
-	return PCI_ADD_BUS(bus->seq, pplat->devfn);
+	return PCI_ADD_BUS(dev_seq(bus), pplat->devfn);
 }
 
 /**
@@ -81,8 +81,8 @@
 
 	ret = uclass_get(UCLASS_PCI, &uc);
 	uclass_foreach_dev(bus, uc) {
-		if (bus->seq > ret)
-			ret = bus->seq;
+		if (dev_seq(bus) > ret)
+			ret = dev_seq(bus);
 	}
 
 	debug("%s: ret=%d\n", __func__, ret);
@@ -513,7 +513,7 @@
 	struct udevice *parent = dev->parent;
 	u16 bc;
 
-	while (parent->seq != 0) {
+	while (dev_seq(parent) != 0) {
 		dm_pci_read_config16(parent, PCI_BRIDGE_CONTROL, &bc);
 		bc |= PCI_BRIDGE_CTL_VGA;
 		dm_pci_write_config16(parent, PCI_BRIDGE_CONTROL, bc);
@@ -529,7 +529,7 @@
 	struct udevice *dev;
 	int ret;
 
-	sub_bus = bus->seq;
+	sub_bus = dev_seq(bus);
 	debug("%s: start\n", __func__);
 	pciauto_config_init(hose);
 	for (ret = device_find_first_child(bus, &dev);
@@ -645,9 +645,9 @@
 	}
 
 	if (!ea_pos) {
-		if (sub_bus != bus->seq) {
+		if (sub_bus != dev_seq(bus)) {
 			debug("%s: Internal error, bus '%s' got seq %d, expected %d\n",
-			      __func__, bus->name, bus->seq, sub_bus);
+			      __func__, bus->name, dev_seq(bus), sub_bus);
 			return -EPIPE;
 		}
 		sub_bus = pci_get_bus_max();
@@ -771,7 +771,7 @@
 		return -EPERM;
 
 	/* Bind a generic driver so that the device can be used */
-	sprintf(name, "pci_%x:%x.%x", parent->seq, PCI_DEV(bdf),
+	sprintf(name, "pci_%x:%x.%x", dev_seq(parent), PCI_DEV(bdf),
 		PCI_FUNC(bdf));
 	str = strdup(name);
 	if (!str)
@@ -803,9 +803,9 @@
 	int ret;
 
 	found_multi = false;
-	end = PCI_BDF(bus->seq, PCI_MAX_PCI_DEVICES - 1,
+	end = PCI_BDF(dev_seq(bus), PCI_MAX_PCI_DEVICES - 1,
 		      PCI_MAX_PCI_FUNCTIONS - 1);
-	for (bdf = PCI_BDF(bus->seq, 0, 0); bdf <= end;
+	for (bdf = PCI_BDF(dev_seq(bus), 0, 0); bdf <= end;
 	     bdf += PCI_BDF(0, 0, 1)) {
 		struct pci_child_plat *pplat;
 		struct udevice *dev;
@@ -832,7 +832,7 @@
 			found_multi = header_type & 0x80;
 
 		debug("%s: bus %d/%s: found device %x, function %d", __func__,
-		      bus->seq, bus->name, PCI_DEV(bdf), PCI_FUNC(bdf));
+		      dev_seq(bus), bus->name, PCI_DEV(bdf), PCI_FUNC(bdf));
 		pci_bus_read_config(bus, bdf, PCI_DEVICE_ID, &device,
 				    PCI_SIZE_16);
 		pci_bus_read_config(bus, bdf, PCI_CLASS_REVISION, &class,
@@ -1010,7 +1010,7 @@
 {
 	struct pci_controller *hose;
 
-	debug("%s, bus=%d/%s, parent=%s\n", __func__, bus->seq, bus->name,
+	debug("%s, bus=%d/%s, parent=%s\n", __func__, dev_seq(bus), bus->name,
 	      bus->parent->name);
 	hose = bus->uclass_priv;
 
@@ -1025,8 +1025,8 @@
 		hose->ctlr = parent_hose->bus;
 	}
 	hose->bus = bus;
-	hose->first_busno = bus->seq;
-	hose->last_busno = bus->seq;
+	hose->first_busno = dev_seq(bus);
+	hose->last_busno = dev_seq(bus);
 	if (dev_of_valid(bus)) {
 		hose->skip_auto_config_until_reloc =
 			dev_read_bool(bus,
@@ -1041,7 +1041,7 @@
 	struct pci_controller *hose = dev_get_uclass_priv(bus);
 	int ret;
 
-	debug("%s: probing bus %d\n", __func__, bus->seq);
+	debug("%s: probing bus %d\n", __func__, dev_seq(bus));
 	ret = pci_bind_bus_devices(bus);
 	if (ret)
 		return ret;
@@ -1068,7 +1068,7 @@
 	 * Note we only call this 1) after U-Boot is relocated, and 2)
 	 * root bus has finished probing.
 	 */
-	if ((gd->flags & GD_FLG_RELOC) && bus->seq == 0 && ll_boot_init()) {
+	if ((gd->flags & GD_FLG_RELOC) && dev_seq(bus) == 0 && ll_boot_init()) {
 		ret = fsp_init_phase_pci();
 		if (ret)
 			return ret;
@@ -1732,7 +1732,7 @@
 				    &class, PCI_SIZE_16);
 
 		debug("%s: bus %d/%s: found VF %x:%x\n", __func__,
-		      bus->seq, bus->name, PCI_DEV(bdf), PCI_FUNC(bdf));
+		      dev_seq(bus), bus->name, PCI_DEV(bdf), PCI_FUNC(bdf));
 
 		/* Find this device in the device tree */
 		ret = pci_bus_find_devfn(bus, PCI_MASK_BUS(bdf), &dev);
@@ -1763,7 +1763,7 @@
 		pplat->virtid = vf * vf_stride + vf_offset;
 
 		debug("%s: bus %d/%s: found VF %x:%x %x:%x class %lx id %x\n",
-		      __func__, dev->seq, dev->name, PCI_DEV(bdf),
+		      __func__, dev_seq(dev), dev->name, PCI_DEV(bdf),
 		      PCI_FUNC(bdf), vendor, device, class, pplat->virtid);
 		bdf += PCI_BDF(0, 0, vf_stride);
 	}
diff --git a/drivers/pci/pci_auto.c b/drivers/pci/pci_auto.c
index 3f46b76..4d797ec 100644
--- a/drivers/pci/pci_auto.c
+++ b/drivers/pci/pci_auto.c
@@ -189,8 +189,8 @@
 
 	/* Configure bus number registers */
 	dm_pci_write_config8(dev, PCI_PRIMARY_BUS,
-			     PCI_BUS(dm_pci_get_bdf(dev)) - ctlr->seq);
-	dm_pci_write_config8(dev, PCI_SECONDARY_BUS, sub_bus - ctlr->seq);
+			     PCI_BUS(dm_pci_get_bdf(dev)) - dev_seq(ctlr));
+	dm_pci_write_config8(dev, PCI_SECONDARY_BUS, sub_bus - dev_seq(ctlr));
 	dm_pci_write_config8(dev, PCI_SUBORDINATE_BUS, 0xff);
 
 	if (pci_mem) {
@@ -265,7 +265,7 @@
 	pci_io = ctlr_hose->pci_io;
 
 	/* Configure bus number registers */
-	dm_pci_write_config8(dev, PCI_SUBORDINATE_BUS, sub_bus - ctlr->seq);
+	dm_pci_write_config8(dev, PCI_SUBORDINATE_BUS, sub_bus - dev_seq(ctlr));
 
 	if (pci_mem) {
 		/* Round memory allocator to 1MB boundary */
diff --git a/drivers/pci/pcie_dw_mvebu.c b/drivers/pci/pcie_dw_mvebu.c
index a5044ca..7ec149d 100644
--- a/drivers/pci/pcie_dw_mvebu.c
+++ b/drivers/pci/pcie_dw_mvebu.c
@@ -500,13 +500,13 @@
 	debug("PCIE Reset on GPIO support is missing\n");
 #endif /* DM_GPIO */
 
-	pcie->first_busno = dev->seq;
+	pcie->first_busno = dev_seq(dev);
 
 	/* Don't register host if link is down */
 	if (!pcie_dw_mvebu_pcie_link_up(pcie->ctrl_base, LINK_SPEED_GEN_3)) {
-		printf("PCIE-%d: Link down\n", dev->seq);
+		printf("PCIE-%d: Link down\n", dev_seq(dev));
 	} else {
-		printf("PCIE-%d: Link up (Gen%d-x%d, Bus%d)\n", dev->seq,
+		printf("PCIE-%d: Link up (Gen%d-x%d, Bus%d)\n", dev_seq(dev),
 		       pcie_dw_get_link_speed(pcie->ctrl_base),
 		       pcie_dw_get_link_width(pcie->ctrl_base),
 		       hose->first_busno);
diff --git a/drivers/pci/pcie_dw_ti.c b/drivers/pci/pcie_dw_ti.c
index 7b3bb70..5e00fcd 100644
--- a/drivers/pci/pcie_dw_ti.c
+++ b/drivers/pci/pcie_dw_ti.c
@@ -634,7 +634,7 @@
 	generic_phy_init(&phy1);
 	generic_phy_power_on(&phy1);
 
-	pci->first_busno = dev->seq;
+	pci->first_busno = dev_seq(dev);
 	pci->dev = dev;
 
 	pcie_dw_setup_host(pci);
@@ -644,11 +644,11 @@
 		pcie_am654_set_mode(pci, DW_PCIE_RC_TYPE);
 
 	if (!pcie_dw_ti_pcie_link_up(pci, LINK_SPEED_GEN_2)) {
-		printf("PCIE-%d: Link down\n", dev->seq);
+		printf("PCIE-%d: Link down\n", dev_seq(dev));
 		return -ENODEV;
 	}
 
-	printf("PCIE-%d: Link up (Gen%d-x%d, Bus%d)\n", dev->seq,
+	printf("PCIE-%d: Link up (Gen%d-x%d, Bus%d)\n", dev_seq(dev),
 	       pcie_dw_get_link_speed(pci),
 	       pcie_dw_get_link_width(pci),
 	       hose->first_busno);
diff --git a/drivers/pci/pcie_ecam_generic.c b/drivers/pci/pcie_ecam_generic.c
index abba9cb..7d1f13d 100644
--- a/drivers/pci/pcie_ecam_generic.c
+++ b/drivers/pci/pcie_ecam_generic.c
@@ -146,7 +146,7 @@
 {
 	struct generic_ecam_pcie *pcie = dev_get_priv(dev);
 
-	pcie->first_busno = dev->seq;
+	pcie->first_busno = dev_seq(dev);
 
 	return 0;
 }
diff --git a/drivers/pci/pcie_fsl.c b/drivers/pci/pcie_fsl.c
index 2bb91ce..b061b31 100644
--- a/drivers/pci/pcie_fsl.c
+++ b/drivers/pci/pcie_fsl.c
@@ -29,16 +29,16 @@
 	if (!pcie->enabled)
 		return -ENXIO;
 
-	if (PCI_BUS(bdf) < bus->seq)
+	if (PCI_BUS(bdf) < dev_seq(bus))
 		return -EINVAL;
 
-	if (PCI_BUS(bdf) > bus->seq && (!fsl_pcie_link_up(pcie) || pcie->mode))
+	if (PCI_BUS(bdf) > dev_seq(bus) && (!fsl_pcie_link_up(pcie) || pcie->mode))
 		return -EINVAL;
 
-	if (PCI_BUS(bdf) == bus->seq && (PCI_DEV(bdf) > 0 || PCI_FUNC(bdf) > 0))
+	if (PCI_BUS(bdf) == dev_seq(bus) && (PCI_DEV(bdf) > 0 || PCI_FUNC(bdf) > 0))
 		return -EINVAL;
 
-	if (PCI_BUS(bdf) == (bus->seq + 1) && (PCI_DEV(bdf) > 0))
+	if (PCI_BUS(bdf) == (dev_seq(bus) + 1) && (PCI_DEV(bdf) > 0))
 		return -EINVAL;
 
 	return 0;
@@ -57,7 +57,7 @@
 		return 0;
 	}
 
-	bdf = bdf - PCI_BDF(bus->seq, 0, 0);
+	bdf = bdf - PCI_BDF(dev_seq(bus), 0, 0);
 	val = bdf | (offset & 0xfc) | ((offset & 0xf00) << 16) | 0x80000000;
 	out_be32(&regs->cfg_addr, val);
 
@@ -93,7 +93,7 @@
 	if (fsl_pcie_addr_valid(pcie, bdf))
 		return 0;
 
-	bdf = bdf - PCI_BDF(bus->seq, 0, 0);
+	bdf = bdf - PCI_BDF(dev_seq(bus), 0, 0);
 	val = bdf | (offset & 0xfc) | ((offset & 0xf00) << 16) | 0x80000000;
 	out_be32(&regs->cfg_addr, val);
 
@@ -123,7 +123,7 @@
 	int ret;
 	struct udevice *bus = pcie->bus;
 
-	ret = fsl_pcie_read_config(bus, PCI_BDF(bus->seq, 0, 0),
+	ret = fsl_pcie_read_config(bus, PCI_BDF(dev_seq(bus), 0, 0),
 				   offset, valuep, size);
 
 	return ret;
@@ -134,7 +134,7 @@
 {
 	struct udevice *bus = pcie->bus;
 
-	return fsl_pcie_write_config(bus, PCI_BDF(bus->seq, 0, 0),
+	return fsl_pcie_write_config(bus, PCI_BDF(dev_seq(bus), 0, 0),
 				     offset, value, size);
 }
 
diff --git a/drivers/pci/pcie_intel_fpga.c b/drivers/pci/pcie_intel_fpga.c
index b5092e6..b496475 100644
--- a/drivers/pci/pcie_intel_fpga.c
+++ b/drivers/pci/pcie_intel_fpga.c
@@ -369,7 +369,7 @@
 	struct intel_fpga_pcie *pcie = dev_get_priv(dev);
 
 	pcie->bus = pci_get_controller(dev);
-	pcie->first_busno = dev->seq;
+	pcie->first_busno = dev_seq(dev);
 
 	/* clear all interrupts */
 	cra_writel(pcie, P2A_INT_STS_ALL, P2A_INT_STATUS);
diff --git a/drivers/pci/pcie_layerscape_fixup.c b/drivers/pci/pcie_layerscape_fixup.c
index c75cf26..a58e7a3 100644
--- a/drivers/pci/pcie_layerscape_fixup.c
+++ b/drivers/pci/pcie_layerscape_fixup.c
@@ -479,7 +479,7 @@
 	for (bus = dev; device_is_on_pci_bus(bus);)
 		bus = bus->parent;
 
-	bdf = entry->bdf - PCI_BDF(bus->seq, 0, 0) + (vf_offset << 8);
+	bdf = entry->bdf - PCI_BDF(dev_seq(bus), 0, 0) + (vf_offset << 8);
 
 	for (i = 0; i < entry->num_vfs; i++) {
 		if (fdt_fixup_pcie_device_ls(blob, bdf, pcie_rc) < 0)
@@ -518,7 +518,7 @@
 		pcie_rc = dev_get_priv(bus);
 
 		/* the DT fixup must be relative to the hose first_busno */
-		bdf = dm_pci_get_bdf(dev) - PCI_BDF(bus->seq, 0, 0);
+		bdf = dm_pci_get_bdf(dev) - PCI_BDF(dev_seq(bus), 0, 0);
 
 		if (fdt_fixup_pcie_device_ls(blob, bdf, pcie_rc) < 0)
 			break;
diff --git a/drivers/pci/pcie_layerscape_gen4.c b/drivers/pci/pcie_layerscape_gen4.c
index a855646..62bfbd9 100644
--- a/drivers/pci/pcie_layerscape_gen4.c
+++ b/drivers/pci/pcie_layerscape_gen4.c
@@ -191,13 +191,13 @@
 	if (!pcie->enabled)
 		return -ENXIO;
 
-	if (PCI_BUS(bdf) < bus->seq)
+	if (PCI_BUS(bdf) < dev_seq(bus))
 		return -EINVAL;
 
-	if ((PCI_BUS(bdf) > bus->seq) && (!ls_pcie_g4_link_up(pcie)))
+	if ((PCI_BUS(bdf) > dev_seq(bus)) && (!ls_pcie_g4_link_up(pcie)))
 		return -EINVAL;
 
-	if (PCI_BUS(bdf) <= (bus->seq + 1) && (PCI_DEV(bdf) > 0))
+	if (PCI_BUS(bdf) <= (dev_seq(bus) + 1) && (PCI_DEV(bdf) > 0))
 		return -EINVAL;
 
 	return 0;
@@ -209,7 +209,7 @@
 	struct udevice *bus = pcie->bus;
 	u32 target;
 
-	if (PCI_BUS(bdf) == bus->seq) {
+	if (PCI_BUS(bdf) == dev_seq(bus)) {
 		if (offset < INDIRECT_ADDR_BNDRY) {
 			ccsr_set_page(pcie, 0);
 			return pcie->ccsr + offset;
@@ -219,7 +219,7 @@
 		return pcie->ccsr + OFFSET_TO_PAGE_ADDR(offset);
 	}
 
-	target = PAB_TARGET_BUS(PCI_BUS(bdf) - bus->seq) |
+	target = PAB_TARGET_BUS(PCI_BUS(bdf) - dev_seq(bus)) |
 		 PAB_TARGET_DEV(PCI_DEV(bdf)) |
 		 PAB_TARGET_FUNC(PCI_FUNC(bdf));
 
diff --git a/drivers/pci/pcie_layerscape_gen4_fixup.c b/drivers/pci/pcie_layerscape_gen4_fixup.c
index 148b5d1..e9ee155 100644
--- a/drivers/pci/pcie_layerscape_gen4_fixup.c
+++ b/drivers/pci/pcie_layerscape_gen4_fixup.c
@@ -166,7 +166,7 @@
 		}
 
 		/* the DT fixup must be relative to the hose first_busno */
-		bdf = dm_pci_get_bdf(dev) - PCI_BDF(bus->seq, 0, 0);
+		bdf = dm_pci_get_bdf(dev) - PCI_BDF(dev_seq(bus), 0, 0);
 		/* map PCI b.d.f to streamID in LUT */
 		ls_pcie_g4_lut_set_mapping(pcie, index, bdf >> 8, streamid);
 		/* update msi-map in device tree */
diff --git a/drivers/pci/pcie_layerscape_rc.c b/drivers/pci/pcie_layerscape_rc.c
index 61b1059..c4e6099 100644
--- a/drivers/pci/pcie_layerscape_rc.c
+++ b/drivers/pci/pcie_layerscape_rc.c
@@ -130,13 +130,13 @@
 	if (!pcie_rc->enabled)
 		return -ENXIO;
 
-	if (PCI_BUS(bdf) < bus->seq)
+	if (PCI_BUS(bdf) < dev_seq(bus))
 		return -EINVAL;
 
-	if ((PCI_BUS(bdf) > bus->seq) && (!ls_pcie_link_up(pcie)))
+	if ((PCI_BUS(bdf) > dev_seq(bus)) && (!ls_pcie_link_up(pcie)))
 		return -EINVAL;
 
-	if (PCI_BUS(bdf) <= (bus->seq + 1) && (PCI_DEV(bdf) > 0))
+	if (PCI_BUS(bdf) <= (dev_seq(bus) + 1) && (PCI_DEV(bdf) > 0))
 		return -EINVAL;
 
 	return 0;
@@ -152,16 +152,16 @@
 	if (ls_pcie_addr_valid(pcie_rc, bdf))
 		return -EINVAL;
 
-	if (PCI_BUS(bdf) == bus->seq) {
+	if (PCI_BUS(bdf) == dev_seq(bus)) {
 		*paddress = pcie->dbi + offset;
 		return 0;
 	}
 
-	busdev = PCIE_ATU_BUS(PCI_BUS(bdf) - bus->seq) |
+	busdev = PCIE_ATU_BUS(PCI_BUS(bdf) - dev_seq(bus)) |
 		 PCIE_ATU_DEV(PCI_DEV(bdf)) |
 		 PCIE_ATU_FUNC(PCI_FUNC(bdf));
 
-	if (PCI_BUS(bdf) == bus->seq + 1) {
+	if (PCI_BUS(bdf) == dev_seq(bus) + 1) {
 		ls_pcie_cfg0_set_busdev(pcie_rc, busdev);
 		*paddress = pcie_rc->cfg0 + offset;
 	} else {
diff --git a/drivers/pci/pcie_mediatek.c b/drivers/pci/pcie_mediatek.c
index 16a9dbf..f555671 100644
--- a/drivers/pci/pcie_mediatek.c
+++ b/drivers/pci/pcie_mediatek.c
@@ -261,7 +261,7 @@
 			return NULL;
 		}
 
-		while (dev->parent->seq != 0)
+		while (dev_seq(dev->parent) != 0)
 			dev = dev->parent;
 
 		pplat = dev_get_parent_plat(dev);
diff --git a/drivers/pci/pcie_rockchip.c b/drivers/pci/pcie_rockchip.c
index 5d5b502..027745e 100644
--- a/drivers/pci/pcie_rockchip.c
+++ b/drivers/pci/pcie_rockchip.c
@@ -373,7 +373,7 @@
 	/* Configure Address Translation. */
 	ret = rockchip_pcie_atr_init(priv);
 	if (ret) {
-		dev_err(dev, "PCIE-%d: ATR init failed\n", dev->seq);
+		dev_err(dev, "PCIE-%d: ATR init failed\n", dev_seq(dev));
 		goto err_power_off_phy;
 	}
 
@@ -528,7 +528,7 @@
 	struct pci_controller *hose = dev_get_uclass_priv(ctlr);
 	int ret;
 
-	priv->first_busno = dev->seq;
+	priv->first_busno = dev_seq(dev);
 	priv->dev = dev;
 
 	ret = rockchip_pcie_parse_dt(dev);
@@ -544,7 +544,7 @@
 		return ret;
 
 	dev_info(dev, "PCIE-%d: Link up (Bus%d)\n",
-		 dev->seq, hose->first_busno);
+		 dev_seq(dev), hose->first_busno);
 
 	return 0;
 }
diff --git a/drivers/serial/serial_mcf.c b/drivers/serial/serial_mcf.c
index a78a7ec..4ba6dc3 100644
--- a/drivers/serial/serial_mcf.c
+++ b/drivers/serial/serial_mcf.c
@@ -85,7 +85,7 @@
 {
 	struct coldfire_serial_plat *plat = dev->plat;
 
-	plat->port = dev->seq;
+	plat->port = dev_seq(dev);
 
 	return mcf_serial_init_common((uart_t *)plat->base,
 						plat->port, plat->baudrate);
diff --git a/drivers/serial/serial_s5p.c b/drivers/serial/serial_s5p.c
index e328fb6..120df83 100644
--- a/drivers/serial/serial_s5p.c
+++ b/drivers/serial/serial_s5p.c
@@ -187,7 +187,7 @@
 
 	plat->reg = (struct s5p_uart *)addr;
 	plat->port_id = fdtdec_get_int(gd->fdt_blob, dev_of_offset(dev),
-					"id", dev->seq);
+					"id", dev_seq(dev));
 	return 0;
 }
 
diff --git a/drivers/spi/altera_spi.c b/drivers/spi/altera_spi.c
index fd01c8e..fadc9f3 100644
--- a/drivers/spi/altera_spi.c
+++ b/drivers/spi/altera_spi.c
@@ -98,7 +98,7 @@
 	uint32_t reg, data, start;
 
 	debug("%s: bus:%i cs:%i bitlen:%i bytes:%i flags:%lx\n", __func__,
-	      bus->seq, slave_plat->cs, bitlen, bytes, flags);
+	      dev_seq(bus), slave_plat->cs, bitlen, bytes, flags);
 
 	if (bitlen == 0)
 		goto done;
diff --git a/drivers/spi/cf_spi.c b/drivers/spi/cf_spi.c
index cc934d1..8adff63 100644
--- a/drivers/spi/cf_spi.c
+++ b/drivers/spi/cf_spi.c
@@ -240,7 +240,7 @@
 	cfspi->baudrate = max_hz;
 
 	/* Read current setup */
-	bus_setup = readl(&dspi->ctar[bus->seq]);
+	bus_setup = readl(&dspi->ctar[dev_seq(bus)]);
 
 	tmp = (prescaler[3] * scaler[15]);
 	/* Maximum and minimum baudrate it can handle */
@@ -294,7 +294,7 @@
 
 	bus_setup &= ~(DSPI_CTAR_PBR(0x03) | DSPI_CTAR_BR(0x0f));
 	bus_setup |= (DSPI_CTAR_PBR(best_i) | DSPI_CTAR_BR(best_j));
-	writel(bus_setup, &dspi->ctar[bus->seq]);
+	writel(bus_setup, &dspi->ctar[dev_seq(bus)]);
 
 	return 0;
 }
@@ -318,7 +318,7 @@
 	if (cfspi->mode & SPI_MODE_MOD) {
 		if ((cfspi->mode & SPI_MODE_XFER_SZ_MASK) == 0)
 			bus_setup |=
-			    readl(&dspi->ctar[bus->seq]) & MCF_FRM_SZ_16BIT;
+			    readl(&dspi->ctar[dev_seq(bus)]) & MCF_FRM_SZ_16BIT;
 		else
 			bus_setup |=
 			    ((cfspi->mode & SPI_MODE_XFER_SZ_MASK) >> 1);
@@ -329,14 +329,14 @@
 		bus_setup |= (cfspi->mode & SPI_MODE_DLY_SCA_MASK) >> 4;
 	} else {
 		bus_setup |=
-			(readl(&dspi->ctar[bus->seq]) & MCF_CTAR_MODE_MASK);
+			(readl(&dspi->ctar[dev_seq(bus)]) & MCF_CTAR_MODE_MASK);
 	}
 
 	cfspi->charbit =
-		((readl(&dspi->ctar[bus->seq]) & MCF_FRM_SZ_16BIT) ==
+		((readl(&dspi->ctar[dev_seq(bus)]) & MCF_FRM_SZ_16BIT) ==
 			MCF_FRM_SZ_16BIT) ? 16 : 8;
 
-	setbits_be32(&dspi->ctar[bus->seq], bus_setup);
+	setbits_be32(&dspi->ctar[dev_seq(bus)], bus_setup);
 
 	return 0;
 }
diff --git a/drivers/spi/fsl_dspi.c b/drivers/spi/fsl_dspi.c
index fcaf2ba..c5e8e2a 100644
--- a/drivers/spi/fsl_dspi.c
+++ b/drivers/spi/fsl_dspi.c
@@ -511,7 +511,7 @@
 		DSPI_MCR_CRXF | DSPI_MCR_CTXF;
 	fsl_dspi_init_mcr(priv, mcr_cfg_val);
 
-	debug("%s probe done, bus-num %d.\n", bus->name, bus->seq);
+	debug("%s probe done, bus-num %d.\n", bus->name, dev_seq(bus));
 
 	return 0;
 }
@@ -527,7 +527,7 @@
 	priv = dev_get_priv(bus);
 
 	/* processor special preparation work */
-	cpu_dspi_claim_bus(bus->seq, slave_plat->cs);
+	cpu_dspi_claim_bus(dev_seq(bus), slave_plat->cs);
 
 	/* configure transfer mode */
 	fsl_dspi_cfg_ctar_mode(priv, slave_plat->cs, priv->mode);
@@ -559,7 +559,7 @@
 	dspi_halt(priv, 1);
 
 	/* processor special release work */
-	cpu_dspi_release_bus(bus->seq, slave_plat->cs);
+	cpu_dspi_release_bus(dev_seq(bus), slave_plat->cs);
 
 	return 0;
 }
diff --git a/drivers/spi/fsl_espi.c b/drivers/spi/fsl_espi.c
index 8545461..e9e7ffd 100644
--- a/drivers/spi/fsl_espi.c
+++ b/drivers/spi/fsl_espi.c
@@ -527,7 +527,7 @@
 	fsl->max_transfer_length = ESPI_MAX_DATA_TRANSFER_LEN;
 	fsl->speed_hz = plat->speed_hz;
 
-	debug("%s probe done, bus-num %d.\n", bus->name, bus->seq);
+	debug("%s probe done, bus-num %d.\n", bus->name, dev_seq(bus));
 
 	return 0;
 }
diff --git a/drivers/spi/octeon_spi.c b/drivers/spi/octeon_spi.c
index 6e02a99..6ac66d2 100644
--- a/drivers/spi/octeon_spi.c
+++ b/drivers/spi/octeon_spi.c
@@ -593,7 +593,7 @@
 	if (ret)
 		return ret;
 
-	debug("SPI bus %s %d at %p\n", dev->name, dev->seq, priv->base);
+	debug("SPI bus %s %d at %p\n", dev->name, dev_seq(dev), priv->base);
 
 	return 0;
 }
diff --git a/drivers/spi/pic32_spi.c b/drivers/spi/pic32_spi.c
index cd83c11..34d7d3e 100644
--- a/drivers/spi/pic32_spi.c
+++ b/drivers/spi/pic32_spi.c
@@ -247,7 +247,7 @@
 	slave_plat = dev_get_parent_plat(slave);
 
 	debug("spi_xfer: bus:%i cs:%i flags:%lx\n",
-	      bus->seq, slave_plat->cs, flags);
+	      dev_seq(bus), slave_plat->cs, flags);
 	debug("msg tx %p, rx %p submitted of %d byte(s)\n",
 	      tx_buf, rx_buf, len);
 
@@ -384,7 +384,7 @@
 	fdt_size_t size;
 	int ret;
 
-	debug("%s: %d, bus: %i\n", __func__, __LINE__, bus->seq);
+	debug("%s: %d, bus: %i\n", __func__, __LINE__, dev_seq(bus));
 	addr = fdtdec_get_addr_size(gd->fdt_blob, node, "reg", &size);
 	if (addr == FDT_ADDR_T_NONE)
 		return -EINVAL;
diff --git a/drivers/spi/sandbox_spi.c b/drivers/spi/sandbox_spi.c
index 755f176..3c780ba 100644
--- a/drivers/spi/sandbox_spi.c
+++ b/drivers/spi/sandbox_spi.c
@@ -72,7 +72,7 @@
 		return -EINVAL;
 	}
 
-	busnum = bus->seq;
+	busnum = dev_seq(bus);
 	cs = spi_chip_select(slave);
 	if (busnum >= CONFIG_SANDBOX_SPI_MAX_BUS ||
 	    cs >= CONFIG_SANDBOX_SPI_MAX_CS) {
diff --git a/drivers/spi/tegra114_spi.c b/drivers/spi/tegra114_spi.c
index 2bfa262..e1fd82b 100644
--- a/drivers/spi/tegra114_spi.c
+++ b/drivers/spi/tegra114_spi.c
@@ -231,7 +231,7 @@
 	int ret;
 
 	debug("%s: slave %u:%u dout %p din %p bitlen %u\n",
-	      __func__, bus->seq, spi_chip_select(dev), dout, din, bitlen);
+	      __func__, dev_seq(bus), spi_chip_select(dev), dout, din, bitlen);
 	if (bitlen % 8)
 		return -1;
 	num_bytes = bitlen / 8;
diff --git a/drivers/spi/tegra20_sflash.c b/drivers/spi/tegra20_sflash.c
index ad19a4e..d386061 100644
--- a/drivers/spi/tegra20_sflash.c
+++ b/drivers/spi/tegra20_sflash.c
@@ -217,7 +217,7 @@
 	int ret;
 
 	debug("%s: slave %u:%u dout %p din %p bitlen %u\n",
-	      __func__, bus->seq, spi_chip_select(dev), dout, din, bitlen);
+	      __func__, dev_seq(bus), spi_chip_select(dev), dout, din, bitlen);
 	if (bitlen % 8)
 		return -1;
 	num_bytes = bitlen / 8;
diff --git a/drivers/spi/tegra20_slink.c b/drivers/spi/tegra20_slink.c
index 57994d2..b99ef38 100644
--- a/drivers/spi/tegra20_slink.c
+++ b/drivers/spi/tegra20_slink.c
@@ -211,7 +211,7 @@
 	int ret;
 
 	debug("%s: slave %u:%u dout %p din %p bitlen %u\n",
-	      __func__, bus->seq, spi_chip_select(dev), dout, din, bitlen);
+	      __func__, dev_seq(bus), spi_chip_select(dev), dout, din, bitlen);
 	if (bitlen % 8)
 		return -1;
 	num_bytes = bitlen / 8;
diff --git a/drivers/spi/tegra210_qspi.c b/drivers/spi/tegra210_qspi.c
index 2baa2ce..a2a7f46 100644
--- a/drivers/spi/tegra210_qspi.c
+++ b/drivers/spi/tegra210_qspi.c
@@ -223,7 +223,7 @@
 	int num_bytes, tm, ret;
 
 	debug("%s: slave %u:%u dout %p din %p bitlen %u\n",
-	      __func__, bus->seq, spi_chip_select(dev), dout, din, bitlen);
+	      __func__, dev_seq(bus), spi_chip_select(dev), dout, din, bitlen);
 	if (bitlen % 8)
 		return -1;
 	num_bytes = bitlen / 8;
diff --git a/drivers/spi/xilinx_spi.c b/drivers/spi/xilinx_spi.c
index b32cdac..0274afd 100644
--- a/drivers/spi/xilinx_spi.c
+++ b/drivers/spi/xilinx_spi.c
@@ -255,7 +255,7 @@
 	int ret;
 
 	debug("spi_xfer: bus:%i cs:%i bitlen:%i bytes:%i flags:%lx\n",
-	      bus->seq, slave_plat->cs, bitlen, bytes, flags);
+	      dev_seq(bus), slave_plat->cs, bitlen, bytes, flags);
 
 	if (bitlen == 0)
 		goto done;
diff --git a/drivers/spi/zynq_qspi.c b/drivers/spi/zynq_qspi.c
index c2ae4e9..2fc28b6 100644
--- a/drivers/spi/zynq_qspi.c
+++ b/drivers/spi/zynq_qspi.c
@@ -568,7 +568,7 @@
 	priv->len = bitlen / 8;
 
 	debug("zynq_qspi_xfer: bus:%i cs:%i bitlen:%i len:%i flags:%lx\n",
-	      bus->seq, slave_plat->cs, bitlen, priv->len, flags);
+	      dev_seq(bus), slave_plat->cs, bitlen, priv->len, flags);
 
 	/*
 	 * Festering sore.
diff --git a/drivers/spi/zynq_spi.c b/drivers/spi/zynq_spi.c
index 281db45..a6efa4a 100644
--- a/drivers/spi/zynq_spi.c
+++ b/drivers/spi/zynq_spi.c
@@ -242,7 +242,7 @@
 	u32 ts, status;
 
 	debug("spi_xfer: bus:%i cs:%i bitlen:%i len:%i flags:%lx\n",
-	      bus->seq, slave_plat->cs, bitlen, len, flags);
+	      dev_seq(bus), slave_plat->cs, bitlen, len, flags);
 
 	if (bitlen % 8) {
 		debug("spi_xfer: Non byte aligned SPI transfer\n");
diff --git a/drivers/usb/gadget/max3420_udc.c b/drivers/usb/gadget/max3420_udc.c
index 53e74d4..a16095f 100644
--- a/drivers/usb/gadget/max3420_udc.c
+++ b/drivers/usb/gadget/max3420_udc.c
@@ -821,7 +821,7 @@
 	struct max3420_udc *udc = dev_get_priv(dev);
 	struct dm_spi_slave_plat *slave_pdata;
 	struct udevice *bus = dev->parent;
-	int busnum = bus->seq;
+	int busnum = dev_seq(bus);
 	unsigned int cs;
 	uint speed, mode;
 	struct udevice *spid;
diff --git a/drivers/usb/host/ehci-mx5.c b/drivers/usb/host/ehci-mx5.c
index 0486263..0af02ba 100644
--- a/drivers/usb/host/ehci-mx5.c
+++ b/drivers/usb/host/ehci-mx5.c
@@ -321,7 +321,7 @@
 	mdelay(1);
 
 	priv->ehci = ehci;
-	priv->portnr = dev->seq;
+	priv->portnr = dev_seq(dev);
 	priv->init_type = type;
 
 	ret = device_get_supply_regulator(dev, "vbus-supply",
diff --git a/drivers/usb/host/ehci-mx6.c b/drivers/usb/host/ehci-mx6.c
index 65ebd7c..a66ea49 100644
--- a/drivers/usb/host/ehci-mx6.c
+++ b/drivers/usb/host/ehci-mx6.c
@@ -596,7 +596,7 @@
 	}
 
 	priv->ehci = ehci;
-	priv->portnr = dev->seq;
+	priv->portnr = dev_seq(dev);
 	priv->init_type = type;
 
 #if CONFIG_IS_ENABLED(DM_REGULATOR)
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index cb50bf3..12c422d 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -383,7 +383,7 @@
 	struct ehci_hcor *hcor;
 
 	priv->ehci = dev_read_addr_ptr(dev);
-	priv->portnr = dev->seq;
+	priv->portnr = dev_seq(dev);
 	priv->init_type = plat->init_type;
 
 	hccr = (struct ehci_hccr *)&priv->ehci->hccapbase;
diff --git a/drivers/usb/host/ehci-vf.c b/drivers/usb/host/ehci-vf.c
index e0e4f84..79ee975 100644
--- a/drivers/usb/host/ehci-vf.c
+++ b/drivers/usb/host/ehci-vf.c
@@ -222,7 +222,7 @@
 	int node = dev_of_offset(dev);
 	const char *mode;
 
-	priv->portnr = dev->seq;
+	priv->portnr = dev_seq(dev);
 
 	priv->ehci = dev_read_addr_ptr(dev);
 	mode = fdt_getprop(dt_blob, node, "dr_mode", NULL);
diff --git a/drivers/usb/host/usb-sandbox.c b/drivers/usb/host/usb-sandbox.c
index e5442e7..d7cc92a 100644
--- a/drivers/usb/host/usb-sandbox.c
+++ b/drivers/usb/host/usb-sandbox.c
@@ -23,7 +23,7 @@
 	type = (pipe & USB_PIPE_TYPE_MASK) >> USB_PIPE_TYPE_SHIFT;
 	debug("0 0 S %c%c:%d:%03ld:%ld", types[type],
 	      pipe & USB_DIR_IN ? 'i' : 'o',
-	      bus->seq,
+	      dev_seq(bus),
 	      (pipe & USB_PIPE_DEV_MASK) >> USB_PIPE_DEV_SHIFT,
 	      (pipe & USB_PIPE_EP_MASK) >> USB_PIPE_EP_SHIFT);
 	if (setup) {
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index decee61..fee92c9 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -701,7 +701,7 @@
 			return ret;
 		ret = usb_find_and_bind_driver(parent, &udev->descriptor,
 					       iface,
-					       udev->controller_dev->seq,
+					       dev_seq(udev->controller_dev),
 					       udev->devnum, port, &dev);
 		if (ret)
 			return ret;
diff --git a/drivers/video/vidconsole-uclass.c b/drivers/video/vidconsole-uclass.c
index a6b7d40..ceb4744 100644
--- a/drivers/video/vidconsole-uclass.c
+++ b/drivers/video/vidconsole-uclass.c
@@ -606,9 +606,9 @@
 	if (!priv->tab_width_frac)
 		priv->tab_width_frac = VID_TO_POS(priv->x_charsize) * 8;
 
-	if (dev->seq) {
+	if (dev_seq(dev)) {
 		snprintf(sdev->name, sizeof(sdev->name), "vidconsole%d",
-			 dev->seq);
+			 dev_seq(dev));
 	} else {
 		strcpy(sdev->name, "vidconsole");
 	}
diff --git a/drivers/virtio/virtio-uclass.c b/drivers/virtio/virtio-uclass.c
index 64a0746..cf2cfae 100644
--- a/drivers/virtio/virtio-uclass.c
+++ b/drivers/virtio/virtio-uclass.c
@@ -240,7 +240,7 @@
 	}
 
 	snprintf(dev_name, sizeof(dev_name), "%s#%d",
-		 virtio_drv_name[uc_priv->device], udev->seq);
+		 virtio_drv_name[uc_priv->device], dev_seq(udev));
 	str = strdup(dev_name);
 	if (!str)
 		return -ENOMEM;
diff --git a/drivers/watchdog/ast_wdt.c b/drivers/watchdog/ast_wdt.c
index 0b8668d..f7b5a1a 100644
--- a/drivers/watchdog/ast_wdt.c
+++ b/drivers/watchdog/ast_wdt.c
@@ -113,7 +113,7 @@
 
 static int ast_wdt_probe(struct udevice *dev)
 {
-	debug("%s() wdt%u\n", __func__, dev->seq);
+	debug("%s() wdt%u\n", __func__, dev_seq(dev));
 	ast_wdt_stop(dev);
 
 	return 0;
diff --git a/drivers/watchdog/at91sam9_wdt.c b/drivers/watchdog/at91sam9_wdt.c
index 10d9974..9e0d89b 100644
--- a/drivers/watchdog/at91sam9_wdt.c
+++ b/drivers/watchdog/at91sam9_wdt.c
@@ -108,7 +108,7 @@
 	if (!priv->regs)
 		return -EINVAL;
 
-	debug("%s: Probing wdt%u\n", __func__, dev->seq);
+	debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
 
 	return 0;
 }
diff --git a/drivers/watchdog/cdns_wdt.c b/drivers/watchdog/cdns_wdt.c
index 06de5bd..966d010 100644
--- a/drivers/watchdog/cdns_wdt.c
+++ b/drivers/watchdog/cdns_wdt.c
@@ -223,7 +223,7 @@
  */
 static int cdns_wdt_probe(struct udevice *dev)
 {
-	debug("%s: Probing wdt%u\n", __func__, dev->seq);
+	debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
 
 	return 0;
 }
diff --git a/drivers/watchdog/omap_wdt.c b/drivers/watchdog/omap_wdt.c
index db9a7d7..ca2bc7c 100644
--- a/drivers/watchdog/omap_wdt.c
+++ b/drivers/watchdog/omap_wdt.c
@@ -242,7 +242,7 @@
 		return -EINVAL;
 
 	priv->wdt_trgr_pattern = 0x1234;
-	debug("%s: Probing wdt%u\n", __func__, dev->seq);
+	debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
 	return 0;
 }
 
diff --git a/drivers/watchdog/orion_wdt.c b/drivers/watchdog/orion_wdt.c
index 35e25d4..167af90 100644
--- a/drivers/watchdog/orion_wdt.c
+++ b/drivers/watchdog/orion_wdt.c
@@ -158,7 +158,7 @@
 	struct orion_wdt_priv *priv = dev_get_priv(dev);
 	int ret;
 
-	debug("%s: Probing wdt%u\n", __func__, dev->seq);
+	debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
 	orion_wdt_stop(dev);
 
 	ret = clk_get_by_name(dev, "fixed", &priv->clk);
diff --git a/drivers/watchdog/sbsa_gwdt.c b/drivers/watchdog/sbsa_gwdt.c
index 7538215..df68adb 100644
--- a/drivers/watchdog/sbsa_gwdt.c
+++ b/drivers/watchdog/sbsa_gwdt.c
@@ -88,7 +88,7 @@
 
 static int sbsa_gwdt_probe(struct udevice *dev)
 {
-	debug("%s: Probing wdt%u (sbsa-gwdt)\n", __func__, dev->seq);
+	debug("%s: Probing wdt%u (sbsa-gwdt)\n", __func__, dev_seq(dev));
 
 	return 0;
 }
diff --git a/drivers/watchdog/sp805_wdt.c b/drivers/watchdog/sp805_wdt.c
index 3249220..291aad7 100644
--- a/drivers/watchdog/sp805_wdt.c
+++ b/drivers/watchdog/sp805_wdt.c
@@ -105,7 +105,7 @@
 
 static int sp805_wdt_probe(struct udevice *dev)
 {
-	debug("%s: Probing wdt%u (sp805-wdt)\n", __func__, dev->seq);
+	debug("%s: Probing wdt%u (sp805-wdt)\n", __func__, dev_seq(dev));
 
 	return 0;
 }
diff --git a/drivers/watchdog/tangier_wdt.c b/drivers/watchdog/tangier_wdt.c
index 358a9b9..bdc6559 100644
--- a/drivers/watchdog/tangier_wdt.c
+++ b/drivers/watchdog/tangier_wdt.c
@@ -80,7 +80,7 @@
 
 static int tangier_wdt_probe(struct udevice *dev)
 {
-	debug("%s: Probing wdt%u\n", __func__, dev->seq);
+	debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
 	return 0;
 }
 
diff --git a/drivers/watchdog/xilinx_tb_wdt.c b/drivers/watchdog/xilinx_tb_wdt.c
index d71ae6c..1687a45 100644
--- a/drivers/watchdog/xilinx_tb_wdt.c
+++ b/drivers/watchdog/xilinx_tb_wdt.c
@@ -85,7 +85,7 @@
 
 static int xlnx_wdt_probe(struct udevice *dev)
 {
-	debug("%s: Probing wdt%u\n", __func__, dev->seq);
+	debug("%s: Probing wdt%u\n", __func__, dev_seq(dev));
 
 	return 0;
 }
diff --git a/drivers/watchdog/xilinx_wwdt.c b/drivers/watchdog/xilinx_wwdt.c
index 49f2043..9137d87 100644
--- a/drivers/watchdog/xilinx_wwdt.c
+++ b/drivers/watchdog/xilinx_wwdt.c
@@ -128,7 +128,7 @@
 	struct xlnx_wwdt_plat *plat = dev_get_plat(dev);
 	struct xlnx_wwdt_priv *wdt = dev_get_priv(dev);
 
-	dev_dbg(dev, "%s: Probing wdt%u\n", __func__, dev->seq);
+	dev_dbg(dev, "%s: Probing wdt%u\n", __func__, dev_seq(dev));
 
 	ret = regmap_init_mem(dev_ofnode(dev), &wdt->regs);
 	if (ret) {
